1. Technical Field
This disclosure relates generally to resource allocation in a computer system and, more specifically, to resolving resource contention in a computer system operating in a pre-memory state.
2. Description of the Related Art
Resource contention in a computer system can occur when multiple processors try to concurrently access a shared resource. Traditionally, resource contention is managed using data structures such as locks or semaphores that are stored in system memory.
When a computer system boots up, however, system memory (e.g., “main memory”) is not immediately accessible to system processors because it has not yet been initialized. In this “pre-memory” environment, resource contention can cause starvation. For example, if access to a resource is obtained on a first-come, first-serve basis, certain processors may be more likely to gain access to a resource while others may rarely or never gain access in a timely manner, resulting in slower boot times. Slow boot times may also be exacerbated by the fact that the resource may only be available via a (relatively) slow bus. Furthermore, access to the resource may be serialized, resulting in an increase in execution time.
Resources may also be inefficiently utilized since they are accessed only whenever processors require data and remain idle when processors are executing other tasks. In addition, when a processor gains control of the resource, it may maintain control even when it is not using the resource, preventing other processors from accessing the resource at the same time. In some instances, this can result in a further delay of overall processor execution time, again leading to slower boot times.